1 #
If _MyType
<> "Empty" Then
5 ''' Module used to define the properties that are available in the My Namespace for Web projects.
7 ''' <remarks></remarks>
8 <Global.Microsoft
.VisualBasic
.HideModuleName()> _
10 Private s_Computer
As New ThreadSafeObjectProvider(Of
Global.Microsoft
.VisualBasic
.Devices
.ServerComputer
)
11 Private s_User
As New ThreadSafeObjectProvider(Of
Global.Microsoft
.VisualBasic
.ApplicationServices
.WebUser
)
12 Private s_Log
As New ThreadSafeObjectProvider(Of
Global.Microsoft
.VisualBasic
.Logging
.AspLog
)
13 Private s_Application
As New ThreadSafeObjectProvider(Of MyApplication
)
16 ''' Returns information about the current application.
18 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
19 Friend ReadOnly
Property Application() As MyApplication
21 Return s_Application
.GetInstance()
26 ''' Returns information about the host computer.
28 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
29 Friend ReadOnly
Property Computer() As Global.Microsoft
.VisualBasic
.Devices
.ServerComputer
31 Return s_Computer
.GetInstance()
35 ''' Returns information for the current Web user.
37 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
38 Friend ReadOnly
Property User() As Global.Microsoft
.VisualBasic
.ApplicationServices
.WebUser
40 Return s_User
.GetInstance()
44 ''' Returns Request object.
46 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
47 <Global.System
.ComponentModel
.Design
.HelpKeyword("My.Request")> _
48 Friend ReadOnly
Property Request() As Global.System
.Web
.HttpRequest
49 <Global.System
.Diagnostics
.DebuggerHidden()> _
51 Dim CurrentContext
As Global.System
.Web
.HttpContext
= Global.System
.Web
.HttpContext
.Current
52 If CurrentContext IsNot
Nothing Then
53 Return CurrentContext
.Request
59 ''' Returns Response object.
61 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
62 <Global.System
.ComponentModel
.Design
.HelpKeyword("My.Response")> _
63 Friend ReadOnly
Property Response() As Global.System
.Web
.HttpResponse
64 <Global.System
.Diagnostics
.DebuggerHidden()> _
66 Dim CurrentContext
As Global.System
.Web
.HttpContext
= Global.System
.Web
.HttpContext
.Current
67 If CurrentContext IsNot
Nothing Then
68 Return CurrentContext
.Response
74 ''' Returns the Asp log object.
76 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
77 Friend ReadOnly
Property Log() As Global.Microsoft
.VisualBasic
.Logging
.AspLog
78 <Global.System
.Diagnostics
.DebuggerHidden()> _
80 Return s_Log
.GetInstance()
85 ''' Provides access to WebServices added to this project.
87 <Global.System
.Diagnostics
.CodeAnalysis
.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
88 <Global.System
.ComponentModel
.Design
.HelpKeyword("My.WebServices")> _
89 Friend ReadOnly
Property WebServices() As MyWebServices
90 <Global.System
.Diagnostics
.DebuggerHidden()> _
92 Return m_MyWebServicesObjectProvider
.GetInstance()
96 <Global.System
.ComponentModel
.EditorBrowsableAttribute(Global.System
.ComponentModel
.EditorBrowsableState
.Never
)> _
97 <Global.Microsoft
.VisualBasic
.MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")> _
98 <Global.System
.Runtime
.CompilerServices
.CompilerGenerated()> _
99 Friend NotInheritable Class MyWebServices
101 <Global.System
.ComponentModel
.EditorBrowsable(Global.System
.ComponentModel
.EditorBrowsableState
.Never
), Global.System
.Diagnostics
.DebuggerHidden()> _
102 Public Overrides
Function Equals(ByVal o
As Object) As Boolean
103 Return MyBase
.Equals(o
)
105 <Global.System
.ComponentModel
.EditorBrowsable(Global.System
.ComponentModel
.EditorBrowsableState
.Never
), Global.System
.Diagnostics
.DebuggerHidden()> _
106 Public Overrides
Function GetHashCode() As Integer
107 Return MyBase
.GetHashCode
109 <Global.System
.ComponentModel
.EditorBrowsable(Global.System
.ComponentModel
.EditorBrowsableState
.Never
), Global.System
.Diagnostics
.DebuggerHidden()> _
110 Friend Overloads
Function [GetType
]() As Global.System
.Type
111 Return GetType(MyWebServices
)
113 <Global.System
.ComponentModel
.EditorBrowsable(Global.System
.ComponentModel
.EditorBrowsableState
.Never
), Global.System
.Diagnostics
.DebuggerHidden()> _
114 Public Overrides
Function ToString() As String
115 Return MyBase
.ToString
118 <Global.System
.Diagnostics
.DebuggerHidden()> _
119 Private Shared
Function Create__Instance__(Of T
As {New})(ByVal instance
As T
) As T
120 If instance Is
Nothing Then
127 <Global.System
.Diagnostics
.DebuggerHidden()> _
128 Private Sub Dispose__Instance__(Of T
)(ByRef instance
As T
)
132 <Global.System
.Diagnostics
.DebuggerHidden()> _
133 <Global.System
.ComponentModel
.EditorBrowsableAttribute(Global.System
.ComponentModel
.EditorBrowsableState
.Never
)> _
139 <Global.System
.Runtime
.CompilerServices
.CompilerGenerated()> Private ReadOnly m_MyWebServicesObjectProvider
As New ThreadSafeObjectProvider(Of MyWebServices
)
142 <Global.System
.Runtime
.CompilerServices
.CompilerGenerated(), Global.System
.ComponentModel
.EditorBrowsableAttribute(Global.System
.ComponentModel
.EditorBrowsableState
.Never
)> Partial
Friend Class MyApplication
143 Inherits
Global.Microsoft
.VisualBasic
.ApplicationServices
.ApplicationBase